
<%@ page import="teste.Pessoa" %>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta name="layout" content="kickstart" />
	<g:set var="entityName" value="${message(code: 'pessoa.label', default: 'Pessoa')}" />
	<title><g:message code="default.list.label" args="[entityName]" /></title>
</head>

<body>
	
<content tag="addOnMenu">	
        <ul class="nav">
						<li class="dropdown">
						
							<a class="dropdown-toggle" 
							   data-toggle="dropdown" 
							   href="#">Novo Menu <b class="caret"></b>
							</a>
							
							<ul class="dropdown-menu">
			                    <g:each var="c" in="${grailsApplication.controllerClasses.sort { it.fullName } }">
			                    <li class="controller"><g:link controller="${c.logicalPropertyName}">${c.fullName.substring(c.fullName.lastIndexOf('.')+1)}</g:link></li>
			                    </g:each>
							</ul>
							
						</li>
		</ul>
</content>		
	
<content tag="header">
<header id="Header" class="jumbotron masthead">
			<div class="inner">
				<div class="container">
					<h1 class="title">List Pessoa !!!</h1>
				</div>
			</div>
</header>
</content>	
	
<section id="list" class="first">

	<table class="table table-bordered">
		<thead>
			<tr>
			
				<g:sortableColumn property="id" title="${message(code: 'pessoa.id.label', default: 'Id')}" />
			
				<g:sortableColumn property="nome" title="${message(code: 'pessoa.nome.label', default: 'Nome')}" />
			
			</tr>
		</thead>
		<tbody>
		<g:each in="${pessoaInstanceList}" status="i" var="pessoaInstance">
			<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
			
				<td><g:link action="show" id="${pessoaInstance.id}">${fieldValue(bean: pessoaInstance, field: "id")}</g:link></td>
			
				<td>${fieldValue(bean: pessoaInstance, field: "nome")}</td>
			
			</tr>
		</g:each>
		</tbody>
	</table>
	<div class="pagination">
		<bs:paginate total="${pessoaInstanceTotal}" />
	</div>
</section>

</body>

</html>
